
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-dns-prefetch-control" content="on"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta content="telephone=no" name="format-detection"/>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
<title>优品镇-每天千款优惠券秒杀，一折限时疯抢！</title>
<meta name="Keywords" content=",优品镇"/>
<meta name="Description" content="优品镇-优惠券折扣直播第一站！每天更新千款，纯人工筛选验货，限时限量特卖，全场1折包邮！"/>
<link href="css/swiper.min.css" rel="stylesheet">
<link href="css/wap_common.css" rel="stylesheet">
<link href="css/wapindex.css" rel="stylesheet"/>
<script src="js/jquery.2.0.min.js"></script>
<script src="js/swiper.jquery.min.js"></script>
<script src="js/lazyload.js"></script>
</head>
<body>
<div class="main-title clearfix">
<a href="/index.html" class="main-logo fl">
优品镇 </a>
<div class="search fl">
<form action="/index.html" method="get">
<input type="hidden" name="r" value="index/search"/>
<button class="search_submit background"></button>
<input type="text" placeholder="好宝贝 等你搜" name="kw" class="search_area" autocomplete="off"/>
</form>
</div>
<a id="mui-action-menu" class="mui-action-menu mui-pull-left main-icon fr" href="javascript:void(0)">
<span></span>
</a>
</div>
<div class="index-wrapper">
<div class="swiper-container" style="width: 100%;">
<!-- <div class="swiper-wrapper">
<div class="swiper-slide">
<a href="/det.html?id=9">
<img style="width: 100%;" src="https://img.alicdn.com/imgextra/i1/2508158775/TB27Y3AdctnpuFjSZFvXXbcTpXa_!!2508158775.jpg"/>
</a>
</div>
<div class="swiper-slide">
<a href="/det.html?id=2">
<img style="width: 100%;" src="https://img.alicdn.com/imgextra/i4/2508158775/TB2Ke_5cHFkpuFjy1XcXXclapXa_!!2508158775.jpg"/>
</a>
</div>
<div class="swiper-slide">
<a href="/det.html?id=3">
<img style="width: 100%;" src="https://img.alicdn.com/imgextra/i3/2508158775/TB2chvRdxhmpuFjSZFyXXcLdFXa_!!2508158775.jpg"/>
</a>
</div>
<div class="swiper-slide">
<a href="/det.html?id=4">
<img style="width: 100%;" src="https://img.alicdn.com/imgextra/i3/2508158775/TB2QLnJaqa5V1Bjy0FaXXaXvpXa_!!2508158775.jpg"/>
</a>
</div>
<div class="swiper-slide">
<a href="/det.html?id=6">
<img style="width: 100%;" src="https://img.alicdn.com/imgextra/i1/2508158775/TB208bhcCFjpuFjSszhXXaBuVXa_!!2508158775.jpg"/>
</a>
</div>
</div> -->
<div class="swiper-pagination"></div>
</div>
<style>
        .swiper-pagination{
            position:absolute;
        text-align:center;
        -webkit-transition:.3s;
        -moz-transition:.3s;
        -o-transition:.3s;
        transition:.3s;
        -webkit-transform:translate3d(0,0,0);
        -ms-transform:translate3d(0,0,0);
        -o-transform:translate3d(0,0,0);
        transform:translate3d(0,0,0);
        z-index:10
        }
        .swiper-pagination-bullet{
            width:8px;
            height:8px;
            display:inline-block;
            border-radius:100%;
            background:#000;
            opacity:.1
        }
        .swiper-pagination-bullet-active{
        width:6px;
        height:6px;
        opacity:1;
        background:white;
        border: #000 1px solid;
        opacity:.1
        }
    </style>
<div class="icon-link-wrapper">
<ul class="icon-url-list clearfix">
<li class="icon-99by">
<a href="/cat.html?node=1001">
<i></i>
<span>9.9包邮</span>
</a>
</li>
<li class="icon-rqb">
<a href="/cat.html?node=1002">
<i></i>
<span>超级人气榜</span>
</a>
</li>
<li class="icon-xblj">
<a href="/cat.html?node=1003">
<i></i>
<span>情人节专区</span>
</a>
</li>
<li class="icon-jpsf">
<a href="/cat.html?node=1004">
<i></i>
<span>居家日用</span>
</a>
</li>
</ul>
</div>
</div>
<div class="you-wrapper clearfix">
<div class="title-wrapper fl"></div>
<div class="text fl">
<span class="mui-badge mui-badge-blue main-badge">12776</span>
</div>
</div>
<div class="goods-list" data-page="2">





<% result.data.forEach(function(item){ %>  
<div class="goods-item">
<a href="/det.html?id=<%=item.id%>" class="img">
<span class="today-wrapper">
<span>小编</span>
<span>精选</span>
</span>
<span class="coupon-wrapper">
<span class="coupon" style="color: #EDFF00;">独家券</span>
<span class="price"><%=item.goods_coupons %>元</span>
</span>
<img src="<%=item.pict_url %>" alt="">
</a>
<a href="<%=item.coupons_promote_url%>" class="title">
<div class="text" style=" color:#777777;"><%= item.goods_title%></div>
</a>
<div class="price-wrapper">
<span class="text">券后</span>
<span class="price">￥<%=item.cprice %></span>
<div class="sold-wrapper">
<span class="sold-num"><%= item.month_sales%></span>
<span class="text">人已买</span>
</div>
</div>
</div>
<% }) %>  

</div>
<div class="pullup-goods">
<div class="label">商品加载中...</div>
</div>
<script language="javascript">
    if(window.history.state){
        $('.goods-list').html(window.history.state.list);
        var pageNo = window.history.state.pageNo;
    }else{
        var pageNo = 2;
    }

    var isFinish = false;
    var isLoading = false;
    var $pullUp = null;
    var needLoadMore = false;
    var maxScrollY = 0;
    var windowHeight = 0;

    $(document).ready(function () {

        var mySwiper = new Swiper('.swiper-container', {
            pagination: '.swiper-pagination',
            loop: true,
            autoplay: 2500
        });

        maxScrollY = $(document).height();
        windowHeight = $(window).height();
        $(window).on('resize', function () {
            windowHeight = $(window).height();
        });
        $(window).scroll(function (e) {
            if (isFinish || isLoading) {
                return;
            }
            var y = $(document).scrollTop();
            maxScrollY = $(document).height();
            windowHeight = $(window).height();
            if (Math.abs(maxScrollY - windowHeight - y) > 100) {
                return;
            }
            var $wrapper = $(this);
            if (!$pullUp) {
                $pullUp = $wrapper.find('.pullup-goods');
            }
            var data = null;
            getData($wrapper, data, 1);
        });

        function getData($wrapper, data, direction) {
            if (isFinish) {
                return;
            }
            isLoading = true;
            if (!$pullUp) {
                $pullUp = $wrapper.find('.pullup-goods');
            }
            var labelTag = $($pullUp).find('.label');
            var tPaht = "/index.html";
            $.ajax(tPaht, {
                data: { pageNo: pageNo},
                dataType: 'json',
                type: 'post',
                error: function (xhr, type, errorThrown) {
                    getData($wrapper, data, direction);
                },
                success: function (result, status, xhr) {
                    needLoadMore = false;
                    if (result.ret == 0&&result.data.length>0) {
                        var data = result.data;

                        for (var i = data.length - 1; i >= 0; i--) {
                            var item = data[i];
                             var goodsItem=$('<div class="goods-item"></div>');                            
                            var d='<a href=/det.html?id='+item.id+' class="img">'+
                                    '<span class="today-wrapper">'+
                                    '<span>小编</span>'+
                                    '<span>精选</span>'+
                                    '</span>'+
                                    '<span class="coupon-wrapper">'+
                                    '<span class="coupon" style="color: #EDFF00;">独家券</span>'+
                                    '<span class="price">'+item.goods_coupons +'元</span>'+
                                    '</span>'+
                                    '<img src="'+item.pict_url +'" alt="">'+
                                    '</a>'+
                                    '<a href="'+item.coupons_promote_url+'" class="title">'+
                                    '<div class="text" style=" color:#777777;">'+ item.goods_title+'</div>'+
                                    '</a>'+
                                    '<div class="price-wrapper">'+
                                    '<span class="text">券后</span>'+
                                    '<span class="price">￥'+item.cprice +'</span>'+
                                    '<div class="sold-wrapper">'+
                                    '<span class="sold-num">'+item.month_sales+'</span>'+
                                    '<span class="text">人已买</span>'+
                                    '</div>'+
                                    '</div>';
                            goodsItem.append(d);
                            $('.goods-list').append(goodsItem);
                        }


                       
                        $("img.lazy").lazyload();
                        aClick();
                        //                        myScroll.refresh();
                        maxScrollY = $(document).height();
                        isLoading = false;
                        pageNo++;
                        $('.goods-list').attr('data-page',pageNo);
                        //                        $(labelTag).html('上拉加载更多商品');
                    } else {
                        //                        myScroll.refresh();
                        maxScrollY = $(document).height();
                        isLoading = false;
                        $("#msg").html('没有更多商品啦');
                        isFinish = true;
                    }
                }
            });
        }
    });
$("img.lazy").lazyload();
</script>
<nav id="show-top-menu">
<div class="mask" id="menu-mask"></div>
<div class="menu-content">
<ul class="main-cat">
<li class="cat-item mm-nolistview">
<a rel="external" href="/cat.html?node=5" class="cnzzCounter">女装</a>
</li>
<li class="cat-item ">
<a rel="external" href="/cat.html?node=18" class="cnzzCounter" >男装</a>
</li>
<li class="cat-item ">
<a rel="external" href="/cat.html?node=9" class="cnzzCounter" >内衣</a>
</li>

<li class="cat-item ">
<a rel="external" href="/cat.html?node=3" class="cnzzCounter" >化妆品</a>
</li>
<li class="cat-item ">
<a rel="external" href="/cat.html?node=12" class="cnzzCounter" >居家</a>
</li>
<li class="cat-item ">
<a rel="external" href="/cat.html?node=37" class="cnzzCounter" >箱包皮具</a>
</li>
<li class="cat-item ">
<a rel="external" href="/cat.html?node=14" class="cnzzCounter" >美食</a>
</li>
<li class="cat-item ">
<a rel="external" href="/cat.html?node=32" class="cnzzCounter" >车品</a>
</li>
<li class="cat-item ">
<a rel="external" href="/cat.html?node=16" class="cnzzCounter" >数码</a>
</li>
<li class="cat-item ">
<a rel="external" href="/cat.html?node=46" class="cnzzCounter" >家电</a>
</li>
</ul>
<span class="up-menu">收起分类</span>
</div>
</nav>
<div class="toTop">&#xe601;</div>
<script src="js/cms_common.js?v=20170111007"></script>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?d5373073631810b88ef122a2937035c6";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>

</body>
</html>